﻿#include "CmdLineChartWindowAddTracer.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdLineChartWindowAddTracer::CmdLineChartWindowAddTracer()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdLineChartWindowAddTracer::~CmdLineChartWindowAddTracer()
    {
    }

    bool CmdLineChartWindowAddTracer::execute()
    {
        bool _success = false;
        emit IBaseSignalInstance->signal_lineChartWindowAddTracer(m_windowUniversalID, m_parameters);
        return true;
    }

    void CmdLineChartWindowAddTracer::undo()
    {
        // TODO: undo
    }

    void CmdLineChartWindowAddTracer::redo()
    {
        execute();
    }

    void CmdLineChartWindowAddTracer::setData(int windowUniversalID, QString parameters)
    {
        m_windowUniversalID = windowUniversalID;
        m_parameters = parameters;
    }

} // namespace PostCommand
